import { GET_TOKEN } from '@/utils/token.ts'
export const conrouter = [
    {
        path: '/',
        component: () => import('@/layout/home.vue'),
        name: 'home'
    },
    {
        path: '/mywork',
        component: () => import('@/layout/mypic/mywork/index.vue'),
        name: 'mywork',
        // redirect: '/mywork/myworks',
        children: [{
            path: 'myworks',
            component: () => import('@/pages/myworks/index.vue')
        },
        {
            path: 'sendwork',
            component: () => import('@/pages/sendwork/index.vue')

        }
        ]
    },
    {
        path: '/mylove',
        component: () => import('@/pages/mylove/index.vue')
    },
    {
        path: '/login',
        component: () => import('@/layout/login.vue'),
        name: 'login',
        beforeRouteEnter(next: any) {
            // ...
            if (GET_TOKEN()) {

            } else {
                next()
            }
        }
    }

]

